package com.guguskins.back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-05-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gu_contract_rate")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class GuContractRate extends Model<GuContractRate> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 饰品区间最小比例
     */
    private BigDecimal goodsTotalMinRate;

    /**
     * 饰品区间最大比例
     */
    private BigDecimal goodsTotalMaxRate;

    /**
     * 平均值取值最小比例
     */
    private BigDecimal goodsAvgMinRate;

    /**
     * 平均值取值最大比例
     */
    private BigDecimal goodsAvgMaxRate;

    /**
     * 最终取值最小比例
     */
    private BigDecimal goodsPriceDownRate;

    /**
     * 最终取值最大比例
     */
    private BigDecimal goodsPriceUpRate;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
